package com.itheima_06;

import java.util.Arrays;
import java.util.List;

public class ArgsDemo02 {
    public static void main(String[] args) {
        //public static <T> List<T> asList(T...a):返回由指定数组支持的固定大小的列表
//        List<String> list = Arrays.asList("hello","world","java");
//        list.add("javaee");//UnsupportedOperationException
//        list.remove("world");//UnsupportedOperationException
//        list.set(1,"javaee");
//        System.out.println(list);

        //public static <E> list<E> of (E... elements):返回包含任意数量元素的不可变列表
//        List<String> list = List.of("hello","world","java","world");

//        list.add("javaee");//UnsupportedOperationException
//        list.remove("java")//UnsupportedOperationException
//        list.set(1,"java");//UnsupportedOperationException

//        System.out.println(list);




    }
}














